#include<stdio.h>
int main(){
    int cnt=0,flag=-1;
    double n1=1,n2=2,n3,ans=0;
    while(cnt<1000)
    {
        flag*=-1;
        cnt++;
        if(flag==1)ans+=n2/n1;
        else ans-=n2/n1;
        n3=n1+n2;
        n1=n2;
        n2=n3;
    }
    printf("%f",ans);
    return 0;
}